.PHONY: run clean

TARGET=build/memory_scheduler

test: $(TARGET) checker
	bash test.sh

checker:
	g++ -O2 check/*.cc -o checker

$(TARGET): build/Makefile
	make -C build -j 16

build:
	mkdir build
	cd build && cmake -G "Unix Makefiles" ..

build/Makefile: build CMakeLists.txt
	cd build && cmake -G "Unix Makefiles" ..

clean:
	rm -rf build

run: $(TARGET)
	$(TARGET) --debug=2 --metricsserver=0
